package com.hdoit.pisces.logical.rel.model;

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.tennetcn.common.message.ModelBase;

@Entity
@Table(name="event")
public class Event extends ModelBase{
	@Id
	@Column(name="eventId")
	private String eventId;
	
	@Column(name="relativeId")
	private String relativeId;
	
	@Column(name="eventDate")
	private Date eventDate;
	
	@Column(name="eventInfo")
	private String eventInfo;
	
	@Column(name="relative_name")
	private String relative_name;
	
	public String getDateOfString(){
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		if(eventDate != null){
			String dateString=format.format(eventDate);
			return dateString;
		}else{
			return "时间不明";
		}	
	}

	public String getEventId() {
		return eventId;
	}

	public void setEventId(String eventId) {
		this.eventId = eventId;
	}

	public String getRelativeId() {
		return relativeId;
	}

	public void setRelativeId(String relativeId) {
		this.relativeId = relativeId;
	}

	public Date getEventDate() {
		return eventDate;
	}

	public void setEventDate(Date eventDate) {
		this.eventDate = eventDate;
	}

	public String getEventInfo() {
		return eventInfo;
	}

	public void setEventInfo(String eventInfo) {
		this.eventInfo = eventInfo;
	}

	public String getRelative_name() {
		return relative_name;
	}

	public void setRelative_name(String relative_name) {
		this.relative_name = relative_name;
	}
	
	
	
}
